<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="statics/css/active.css" type="text/css">
<script type="text/javascript" src="statics/js/jquery-1.12.4.js" charset="UTF-8"></script>
<script  language="javascript" src="statics/js/active.js" type="text/javascript" charset="UTF-8"></script>
<script src="statics/layer/layer.js"></script>
<title>活动中心</title>
</head>
<body class="bd">
	<jsp:include page="top.jsp"></jsp:include>
		<div class="huodong">
			
		    <c:forEach items="${list}" var="list">
			<div class="hd">
				<div class="tu"><img alt="" src="statics/image/upload/huodong/${list.dpicture}"></div>
				<div class="head">
					<h2>${list.dName}</h2>
					<p class="wenzi">${list.describe}</p><br>
					<c:if test="${udlist!=null}">
						 <c:set var="isDoing" value="0"/>
						 <c:forEach items="${udlist}" var="udlist">
						 <c:if test="${list.dnum>=1&&list.dId!=udlist.dId}"><button class="btn" id="${list.dId}" num="${list.dnum}" dname="${list.dName}" dtime="${list.dTime}">领优惠券</button></c:if>
						 <c:if test="${list.dnum>=1&&list.dId==udlist.dId}"><c:set var="isDoing" value="1"/></c:if>
						 </c:forEach>
						 <c:if test="${isDoing=='1'}">
	 					 <button class="no" >已领取</button>
						 </c:if>
					 </c:if>
					<c:if test="${udlist==null}">
						<button class="btn" id="${list.dId}" num="${list.dnum}" dname="${list.dName}" dtime="${list.dTime}">领优惠券</button>
					</c:if>
					<c:if test="${list.dnum<=0}"><button class="no">已领完</button></c:if>
				</div>
			</div>
		    </c:forEach>
		    
		 <div class="kg"></div>
		</div>
	<jsp:include page="bottom.jsp"></jsp:include>
</body>
</html>